// JavaScript Document
$(document).ready(function(){
						   
						   $('#from_date').datePicker().val();
						   $('#to_date').datePicker().val();

	$('#from_date').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				$('#to_date').dpSetStartDate(d.addDays(1).asString());
			}
		}
	);
	$('#to_date').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				$('#from_date').dpSetEndDate(d.addDays(-1).asString());
			}
		}
	);

  
	
	$("#ailie").fcbkcomplete({ json_url: "airline.php",cache: false,filter_case: false,filter_hide: false,firstselected: false});

	
						   });

$("#edit_markup").validate({
							 
		
   submitHandler: function(form) {
	   
	  	
	   
		$.ajax({
				type:"POST",
				url:"make_markup.php",
				data:$("#edit_markup").serialize(),
				cache: false,
				
				success: function(msg){
     				$("#contactArea").html("<div style='padding-top:120px; text-align:center;  color:green;'><img src='accept.png' align='absmiddle'> Your Markup is sucessfully Updated....</div>");
					jQuery("#flex2").flexReload(); 
					disablePopup();
					
   						}

		});
		 $("#contactArea").html("<div style='padding-top:120px; text-align:center;'><img src='18-0.gif' align='absmiddle'><br>Updated Markup ....</div>");

   }
})

